package com.becca.cake.dao.advert;

import java.util.List;
import java.util.Map;

import org.springframework.dao.DataAccessException;
import org.springframework.stereotype.Repository;

import com.becca.cake.model.advert.AdvertModel;
/**
 * 广告管理DAO接口
 * @copyright  尊星(上海)信息科技有限公司
 * @author yellow
 * @date 2016年5月27日 下午4:03:42
 */
@Repository
public interface AdvertDAO {
    /**
     * 广告查询
     * @param map
     * @return
     * @throws DataAccessException
     */
    List<AdvertModel> selectAdverts(Map<String, Object> map) throws DataAccessException;
    
    /**
     * 获取查询广告数据列表总条数
     * @param map
     * @return
     * @throws DataAccessException
     */
    Long selectAdvertsCount(Map<String, Object> map) throws DataAccessException;

    /**
     * 添加广告信息
     * @param AdvertModel
     * @throws DataAccessException
     */
    void insertAdvert(AdvertModel advertModel) throws DataAccessException;

    /**
     * 修改广告信息
     * @param AdvertModel
     * @throws DataAccessException
     */
    void updateAdvert(AdvertModel advertModel) throws DataAccessException;
    
    /**
     * 根据id查询广告对象
     * @param advertId
     * @return
     * @throws DataAccessException
     */
    AdvertModel selectAdvertById(Integer advertId) throws DataAccessException;
    
    /**
     * 批量修改排序
     * @param map
     * @throws DataAccessException
     */
     void updateOrders (List<AdvertModel> list) throws DataAccessException;
    
   /**
    * 禁用或启用广告
    * @param map
    * @throws DataAccessException
    */
    void updateAdvStatusById (Map<String, Object> map) throws DataAccessException;
    
     
     
   
}
